package com.miplus.ccrm.core.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName msg_annouces_read
 */
@TableName(value ="msg_annouces_read")
@Data
public class MsgAnnoucesRead implements Serializable {
    /**
     * 序列ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 公告ID
     */
    private Integer annouceid;

    /**
     * 已读用户
     */
    private String readusr;

    /**
     * 已读时间
     */
    private Date readdt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MsgAnnoucesRead other = (MsgAnnoucesRead) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAnnouceid() == null ? other.getAnnouceid() == null : this.getAnnouceid().equals(other.getAnnouceid()))
            && (this.getReadusr() == null ? other.getReadusr() == null : this.getReadusr().equals(other.getReadusr()))
            && (this.getReaddt() == null ? other.getReaddt() == null : this.getReaddt().equals(other.getReaddt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAnnouceid() == null) ? 0 : getAnnouceid().hashCode());
        result = prime * result + ((getReadusr() == null) ? 0 : getReadusr().hashCode());
        result = prime * result + ((getReaddt() == null) ? 0 : getReaddt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", annouceid=").append(annouceid);
        sb.append(", readusr=").append(readusr);
        sb.append(", readdt=").append(readdt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}